#!/usr/bin/env python
PACKAGE = "galaxy_camera"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

# Exposure
gen.add("exposure_value", double_t, 0, "Exposure time when not in auto mode", 100., 20., 1000000.)
gen.add("exposure_min", double_t, 0, "Min exposure time(us)", 100., 20., 1000000.)
gen.add("exposure_max", double_t, 0, "Max exposure time(us)", 5000., 20., 1000000.)
gen.add("exposure_auto", bool_t, 0, "Auto exposure", True)

# Gain
gen.add("gain_value", double_t, 0, "Gain value(dB) when not in auto mode", 2., 0., 16.)
gen.add("gain_min", double_t, 0, "Min gain dB", 0., 0., 16.)
gen.add("gain_max", double_t, 0, "Max gain dB", 16., 0., 16.)
gen.add("gain_auto", bool_t, 0, "Auto Gain", True)

# Black Level
gen.add("black_value", double_t, 0, "Black value when not in auto mode", 2., 0., 16.)
gen.add("black_auto", bool_t, 0, "Auto black level", True)

# White balance
channel = gen.enum([gen.const("Red", int_t, 0, "Red channel"),
                    gen.const("Green", int_t, 1, "Green channel"),
                    gen.const("Blue", int_t, 2, "Blue channel")],
                   "channel")
gen.add("white_selector", int_t, 0, "White balance channel selector", 0, 0, 2, edit_method=channel)
gen.add("white_value", double_t, 0, "White balance value(dB) when not in auto mode", 1., 1., 7.9961)
gen.add("white_auto", bool_t, 0, "Auto white", True)

exit(gen.generate(PACKAGE, "galaxy_camera", "Camera"))
